<template>
    <div>
        <el-row>
            <span style="margin:auto 0;">参数名称</span>
            <el-col :span="4"><el-input v-model="filter.name"></el-input></el-col>
            <span style="margin:auto 0">状态</span>
            <el-select>
                <el-option label="正常" value=true></el-option>
                <el-option label="异常" value=false></el-option>
            </el-select>
            <el-button type="success">查询</el-button>
        </el-row>
        <el-row>
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="index" label="序号" />
                <el-table-column prop="name" label="参数名" />
                <el-table-column prop="value" label="值" />
                <el-table-column prop="unit" label="单位" />
                <el-table-column label="绘图">
                    <template #default="scope">
                        <el-checkbox v-model="scope.row.show"></el-checkbox>
                    </template>
                </el-table-column>
                <el-table-column label="状态">
                    <template #default="scope">
                        <el-button circle :type="scope.row.status?'success':'danger'" size="small"></el-button>
                    </template>
                </el-table-column>
                <el-table-column prop="tips" label="处置建议" />
            </el-table>
        </el-row>
        <el-row :span="2">
            <canvas id="canvas" style="width:100%;background:white"></canvas>
        </el-row>
    </div>
</template>

<script>
//import InitModule from "../../javascript/chart"
export default {
    async mounted(){
        // InitModule({
        //     canvas: (function() {
        //         var canvas = document.getElementById('canvas');
        //         return canvas;
        //     })()
        // })
    },
    data(){
        return {
            tableData:[
                {
                    index: 1,
                    name: '滑油温度',
                    value: '100',
                    unit: '°C',
                    show: false,
                    status:false,
                    tips:''
                },
            ],
            filter:{
                name:'',
            }
        }
    }
}
</script>